[Ivy]
[>Created: Fri Jan 03 16:33:56 ICT 2014]
143429C3959449FF 3.17 #module
>Proto >Proto Collection #zClass
Cs0 CRUDDemoFormProcess Big #zClass
Cs0 RD #cInfo
Cs0 #process
Cs0 @TextInP .ui2RdDataAction .ui2RdDataAction #zField
Cs0 @TextInP .rdData2UIAction .rdData2UIAction #zField
Cs0 @TextInP .resExport .resExport #zField
Cs0 @TextInP .type .type #zField
Cs0 @TextInP .processKind .processKind #zField
Cs0 @AnnotationInP-0n ai ai #zField
Cs0 @TextInP .xml .xml #zField
Cs0 @TextInP .responsibility .responsibility #zField
Cs0 @RichDialogInitStart f0 '' #zField
Cs0 @RichDialogProcessEnd f1 '' #zField
Cs0 @GridStep f4 '' #zField
Cs0 @RichDialogProcessEnd f6 '' #zField
Cs0 @PushWFArc f7 '' #zField
Cs0 @GridStep f8 '' #zField
Cs0 @PushWFArc f9 '' #zField
Cs0 @PushWFArc f2 '' #zField
Cs0 @RichDialogProcessStart f3 '' #zField
Cs0 @PushWFArc f5 '' #zField
Cs0 @RichDialogMethodStart f10 '' #zField
Cs0 @RichDialogProcessEnd f11 '' #zField
Cs0 @PushWFArc f12 '' #zField
Cs0 @RichDialogProcessStart f13 '' #zField
Cs0 @RichDialogProcessEnd f14 '' #zField
Cs0 @GridStep f16 '' #zField
Cs0 @PushWFArc f17 '' #zField
Cs0 @PushWFArc f15 '' #zField
Cs0 @RichDialogProcessStart f18 '' #zField
Cs0 @RichDialogProcessEnd f19 '' #zField
Cs0 @GridStep f21 '' #zField
Cs0 @PushWFArc f22 '' #zField
Cs0 @PushWFArc f20 '' #zField
Cs0 @RichDialogProcessStart f23 '' #zField
Cs0 @RichDialogProcessEnd f24 '' #zField
Cs0 @RichDialog f25 '' #zField
Cs0 @PushWFArc f29 '' #zField
Cs0 @PushWFArc f26 '' #zField
>Proto Cs0 Cs0 CRUDDemoFormProcess #zField
Cs0 f0 guid 143429C396D721BE #txt
Cs0 f0 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f0 method start() #txt
Cs0 f0 disableUIEvents true #txt
Cs0 f0 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<> param = methodEvent.getInputArguments();
' #txt
Cs0 f0 outParameterDecl '<> result;
' #txt
Cs0 f0 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>start()</name>
    </language>
</elementInfo>
' #txt
Cs0 f0 86 54 20 20 13 0 #rect
Cs0 f0 @|RichDialogInitStartIcon #fIcon
Cs0 f1 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f1 86 182 20 20 13 0 #rect
Cs0 f1 @|RichDialogProcessEndIcon #fIcon
Cs0 f4 actionDecl 'vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData out;
' #txt
Cs0 f4 actionTable 'out=in;
' #txt
Cs0 f4 actionCode 'import vision.nvhuong.enums.ServiceName;
import vision.nvhuong.service.ServicesHolder;
import vision.nvhuong.entity.Student;
import vision.nvhuong.service.StudentService;

//ivy.log.info("student: "+in.student);


StudentService studentService = ServicesHolder.getService(ServiceName.STUDENT_SERVICE) as StudentService;
if(in.student.getId() == 0){
	Student seletedStudent = new Student();
	seletedStudent.setName(in.student.getName());
	seletedStudent.setSchool(in.student.getSchool());
	seletedStudent.setGPA(in.student.getGPA());
	studentService.save(seletedStudent);
}else{
	studentService.save(in.student);
}

//ivy.log.info("student: "+ addedStudent.getName() +" - "+addedStudent.getSchool() +" - "+ addedStudent.getGPA());

//update list
in.studentList = studentService.findAll();

//ivy.log.info("end list("+in.studentList.size()+"): "+in.studentList);


' #txt
Cs0 f4 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f4 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>create or update</name>
        <nameStyle>16,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Cs0 f4 254 117 36 22 22 -9 #rect
Cs0 f4 @|StepIcon #fIcon
Cs0 f6 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f6 262 182 20 20 13 0 #rect
Cs0 f6 @|RichDialogProcessEndIcon #fIcon
Cs0 f7 expr out #txt
Cs0 f7 272 139 272 182 #arcP
Cs0 f8 actionDecl 'vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData out;
' #txt
Cs0 f8 actionTable 'out=in;
' #txt
Cs0 f8 actionCode 'import vision.nvhuong.entity.Student;
import vision.nvhuong.enums.ServiceName;
import vision.nvhuong.service.StudentService;
import vision.nvhuong.service.ServicesHolder;

StudentService studentService = ServicesHolder.getService(ServiceName.STUDENT_SERVICE) as StudentService;
in.studentList = studentService.findAll();

in.student = new Student();
in.student.setId(0);
in.student.setName("");
in.student.setSchool("");
in.student.setGPA(0.0);
' #txt
Cs0 f8 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f8 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>init value</name>
        <nameStyle>10,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Cs0 f8 78 116 36 24 23 -11 #rect
Cs0 f8 @|StepIcon #fIcon
Cs0 f9 expr out #txt
Cs0 f9 96 74 96 116 #arcP
Cs0 f2 expr out #txt
Cs0 f2 96 140 96 182 #arcP
Cs0 f3 guid 1435260A8C0EB07A #txt
Cs0 f3 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f3 actionDecl 'vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData out;
' #txt
Cs0 f3 actionTable 'out=in;
' #txt
Cs0 f3 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>save</name>
        <nameStyle>4,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Cs0 f3 262 54 20 20 13 0 #rect
Cs0 f3 @|RichDialogProcessStartIcon #fIcon
Cs0 f5 expr out #txt
Cs0 f5 272 74 272 117 #arcP
Cs0 f10 guid 14355C1520568DE6 #txt
Cs0 f10 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f10 method setStudent(vision.nvhuong.entity.Student) #txt
Cs0 f10 disableUIEvents false #txt
Cs0 f10 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<vision.nvhuong.entity.Student student> param = methodEvent.getInputArguments();
' #txt
Cs0 f10 inParameterMapAction 'out.student=param.student;
' #txt
Cs0 f10 outParameterDecl '<> result;
' #txt
Cs0 f10 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>setStudent(Student)</name>
        <nameStyle>19,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Cs0 f10 390 54 20 20 13 0 #rect
Cs0 f10 @|RichDialogMethodStartIcon #fIcon
Cs0 f11 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f11 390 182 20 20 13 0 #rect
Cs0 f11 @|RichDialogProcessEndIcon #fIcon
Cs0 f12 expr out #txt
Cs0 f12 400 74 400 182 #arcP
Cs0 f13 guid 14355EA1B03A3297 #txt
Cs0 f13 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f13 actionDecl 'vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData out;
' #txt
Cs0 f13 actionTable 'out=in;
' #txt
Cs0 f13 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>delete</name>
        <nameStyle>6,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Cs0 f13 566 54 20 20 13 0 #rect
Cs0 f13 @|RichDialogProcessStartIcon #fIcon
Cs0 f14 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f14 566 182 20 20 13 0 #rect
Cs0 f14 @|RichDialogProcessEndIcon #fIcon
Cs0 f16 actionDecl 'vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData out;
' #txt
Cs0 f16 actionTable 'out=in;
' #txt
Cs0 f16 actionCode 'import vision.nvhuong.enums.ServiceName;
import vision.nvhuong.service.ServicesHolder;
import vision.nvhuong.entity.Student;
import vision.nvhuong.service.StudentService;


ivy.log.info("deleted student: "+in.student);

StudentService studentService = ServicesHolder.getService(ServiceName.STUDENT_SERVICE) as StudentService;
studentService.remove(in.student);

//update list
in.studentList = studentService.findAll();
in.student = new Student();



' #txt
Cs0 f16 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f16 558 116 36 24 20 -2 #rect
Cs0 f16 @|StepIcon #fIcon
Cs0 f17 expr out #txt
Cs0 f17 576 74 576 116 #arcP
Cs0 f15 expr out #txt
Cs0 f15 576 140 576 182 #arcP
Cs0 f18 guid 14355F3333E1AD6E #txt
Cs0 f18 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f18 actionDecl 'vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData out;
' #txt
Cs0 f18 actionTable 'out=in;
' #txt
Cs0 f18 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>resetAddDetailForm</name>
        <nameStyle>18,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Cs0 f18 694 54 20 20 13 0 #rect
Cs0 f18 @|RichDialogProcessStartIcon #fIcon
Cs0 f19 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f19 694 182 20 20 13 0 #rect
Cs0 f19 @|RichDialogProcessEndIcon #fIcon
Cs0 f21 actionDecl 'vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData out;
' #txt
Cs0 f21 actionTable 'out=in;
' #txt
Cs0 f21 actionCode 'import vision.nvhuong.entity.Student;
import org.primefaces.context.RequestContext;

RequestContext context = RequestContext.getCurrentInstance();
context.reset("addDetailForm");
in.student = new Student();' #txt
Cs0 f21 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f21 686 108 36 24 20 -2 #rect
Cs0 f21 @|StepIcon #fIcon
Cs0 f22 expr out #txt
Cs0 f22 704 74 704 108 #arcP
Cs0 f20 expr out #txt
Cs0 f20 704 132 704 182 #arcP
Cs0 f23 guid 14357651AB49DCCE #txt
Cs0 f23 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f23 actionDecl 'vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData out;
' #txt
Cs0 f23 actionTable 'out=in;
' #txt
Cs0 f23 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>comeBackLoginPage</name>
        <nameStyle>17,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Cs0 f23 86 238 20 20 13 0 #rect
Cs0 f23 @|RichDialogProcessStartIcon #fIcon
Cs0 f24 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f24 86 382 20 20 13 0 #rect
Cs0 f24 @|RichDialogProcessEndIcon #fIcon
Cs0 f25 targetWindow NEW:card: #txt
Cs0 f25 targetDisplay TOP #txt
Cs0 f25 richDialogId vision.nvhuong.helloIvy.loginForm #txt
Cs0 f25 startMethod start() #txt
Cs0 f25 type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
Cs0 f25 requestActionDecl '<> param;' #txt
Cs0 f25 responseActionDecl 'vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData out;
' #txt
Cs0 f25 responseMappingAction 'out=in;
' #txt
Cs0 f25 windowConfiguration '* ' #txt
Cs0 f25 isAsynch false #txt
Cs0 f25 isInnerRd true #txt
Cs0 f25 userContext '* ' #txt
Cs0 f25 78 316 36 24 20 -2 #rect
Cs0 f25 @|RichDialogIcon #fIcon
Cs0 f29 expr out #txt
Cs0 f29 96 340 96 382 #arcP
Cs0 f26 expr out #txt
Cs0 f26 96 258 96 316 #arcP
>Proto Cs0 .type vision.nvhuong.helloIvy.CRUDDemoForm.CRUDDemoFormData #txt
>Proto Cs0 .processKind HTML_DIALOG #txt
>Proto Cs0 -8 -8 16 16 16 26 #rect
>Proto Cs0 '' #fIcon
Cs0 f4 mainOut f7 tail #connect
Cs0 f7 head f6 mainIn #connect
Cs0 f0 mainOut f9 tail #connect
Cs0 f9 head f8 mainIn #connect
Cs0 f8 mainOut f2 tail #connect
Cs0 f2 head f1 mainIn #connect
Cs0 f3 mainOut f5 tail #connect
Cs0 f5 head f4 mainIn #connect
Cs0 f10 mainOut f12 tail #connect
Cs0 f12 head f11 mainIn #connect
Cs0 f13 mainOut f17 tail #connect
Cs0 f17 head f16 mainIn #connect
Cs0 f16 mainOut f15 tail #connect
Cs0 f15 head f14 mainIn #connect
Cs0 f18 mainOut f22 tail #connect
Cs0 f22 head f21 mainIn #connect
Cs0 f21 mainOut f20 tail #connect
Cs0 f20 head f19 mainIn #connect
Cs0 f25 mainOut f29 tail #connect
Cs0 f29 head f24 mainIn #connect
Cs0 f23 mainOut f26 tail #connect
Cs0 f26 head f25 mainIn #connect
